#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    int n[3] = { 0 };
    int x = 0;
    int y = 0;
    while (scanf("%d", &x) == 1)
    {

        for (int j = 0; j < 3; j++)
        {
            if (x >= n[j])
            {
                for (int a = 2; a > j; a--)
                {
                    n[a] = n[a - 1];
                }
                n[j] = x;
                break;
            }
        }
        y++;
        if (y == 3)
        {
            y = 0;
            if ((n[2] + n[1]) > n[0])
            {
                if (n[2] == n[1] && n[1] == n[0])
                {
                    printf("Equilateral triangle!\n");
                }
                else if (n[2] == n[1] || n[1] == n[0])
                {
                    printf("Isosceles triangle!\n");
                }
                else
                {
                    printf("Ordinary triangle!\n");
                }
            }
            else
            {
                printf("Not a triangle!\n");
            }
            n[0] = 0;
            n[1] = 0;
            n[2] = 0;
        }
    }

    return 0;
}